unit ufrmNavegador;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, cefvcl, ceflib, cxGraphics, cxLookAndFeelPainters,
  StdCtrls, cxButtons, cxLookAndFeels, Menus;

type
  TfrmNavegador = class(TForm)
    chrome: TChromium;
    btnFechar: TcxButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
    procedure ChromeTitleChange(Sender: TObject; const browser: ICefBrowser;
      const title: ustring; out Result: Boolean);
    procedure btnFecharClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmNavegador: TfrmNavegador;

implementation

{$R *.dfm}

procedure TfrmNavegador.btnFecharClick(Sender: TObject);
begin
  Close;
end;

procedure TfrmNavegador.ChromeTitleChange(Sender: TObject;
  const browser: ICefBrowser; const title: ustring; out Result: Boolean);
begin
  Self.Caption := title;
end;

procedure TfrmNavegador.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
  frmNavegador := nil;
end;

procedure TfrmNavegador.FormShow(Sender: TObject);
begin
  chrome.Load('www.turvocar.com.br');
end;

end.
